#include <fstream>
#include "logger.h"


namespace Putin{


	Logger::Logger()
	{
		mFout = new std::ofstream("logg.txt",std::ios::app);
	}

	Logger::~Logger()
	{
		mFout->close();
		delete mFout;
	}

	void Logger::logg(std::string text)
	{
		std::string off = text;
		mFout->write(text.c_str(),text.size());
		mFout->flush(); // makes the logg visible even though the program crashes
	}

	void Logger::loggLine(std::string line)
	{
		logg(line + "\n");
	}

	Logger* gLogger = new Logger(); 
}